//
//  HotelDetailTitleCell.swift
//  DLuxTravel
//
//  Created by 陆涛 on 2018/11/27.
//  Copyright © 2018 imguider. All rights reserved.
//

import UIKit

class HotelDetailTitleCell: BaseCell {

    @IBOutlet weak var layerView: UIView!
    
    
    @IBOutlet weak var tagView: CustomTagView!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        
        setupUI()
    }
    
    private func setupUI() {
        
        configCell(.container)
        layerView.addShadow(.hotelDetail)
        
        setupTagView()
    }
    
    private func setupTagView() {
        
        
        let tagArray = ["亲子","海岛","海岛蜜月"]
        
        if tagArray.count > 0 {
            
            tagView.isHidden = false
            tagView.setTagArray(tagArray) { maker in
                
                let color = kContentColor
                
                maker?.strokeColor = color
                maker?.strokeWidth = 1.0
                maker?.cornerRadius = 8
                maker?.insets =  UIEdgeInsets(top: -1, left: -8, bottom: -1, right: -8)
                maker?.font = kFont10
                maker?.textColor = color
                maker?.space = 8
                maker?.linespace = 16
                maker?.tagAlignment = .left
            }
        } else {
            
            tagView.tagViewH?.constant = 0
            tagView.isHidden = true
        }
    }
    
}
